<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>8 模板语法-指令</title>
    <script src="js/vue.global.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
<div id="app" class="demo">
    <select v-model="selected">
        <option v-for="option in options" :value="option.value">
            {{ option.text }}
        </option>
    </select>
    <span>选择的是: {{ selected }}</span>
</div>

<script>
    const app = {
        data() {
            return {
                selected: 'www.runoob.com',
                options: [
                    { text: 'Runoob', value: 'www.runoob.com' },
                    { text: 'Google', value: 'www.google.com' },
                    { text: 'Taobao', value: 'www.taobao.com' }
                ]
            }
        }
    }

    Vue.createApp(app).mount('#app')
</script>
</body>
</html>